import request from '@/utils/request'

export function getCommodityList(params) {
  return request({
    url: '/vue-element-admin/get/commodityList',
    method: 'get',
    params
  })
}

export function setCommodity(data) {
  return request({
    url: '/vue-element-admin/setCommodity',
    method: 'post',
    data
  })
}
export function setCommodityGroup(params) {
  return request({
    url: '/vue-element-admin/setCommodityGroup',
    method: 'get',
    params
  })
}

export function saveCommodity(params) {
  return request({
    url: '/vue-element-admin/saveCommodity',
    method: 'get',
    params
  })
}

export function addCommodity(data) {
  return request({
    url: '/vue-element-admin/add/commodity',
    method: 'post',
    data
  })
}
export function getCommodityById(params) {
  return request({
    url: '/vue-element-admin/getCommodityById',
    method: 'get',
    params
  })
}
